/**
 * 
 */
package portfolios;
import com.opensymphony.xwork2.ActionSupport;
/**
 * @author lf
 *
 */
public class Register extends ActionSupport{
	
	//username
	private String username;
	//password
	private String password;
	//portfolios
	private String portfolios;
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getPortfolios() {
		return portfolios;
	}
	public void setPortfolios(String portfolios) {
		this.portfolios = portfolios;
	}
	
	public String execute(){
		//anything not
		return SUCCESS;
	}
	
	public void validate(){
		if(this.getPassword().isEmpty()){
			this.addFieldError("password", "Password is required!");
		}
		if(this.getUsername().length() == 0){
			this.addFieldError("username", "Username is required!");
		}
	}
	
}
